#ifndef GMTVIODEVICE_H
#define GMTVIODEVICE_H
#define TESTING //undef it if you want code to run from http else if you wna to play it frm local file keep it defined


#include <QIODevice>
#include <QUrl>
//#include <QHttp>
#include <QFile>
#include <QDebug>
#include <QDataStream>


class mTVDevice : public QIODevice
{
Q_OBJECT
public:
     mTVDevice();
     ~mTVDevice();
     mTVDevice(QUrl url);
     bool isSequential ();
     bool open ( QIODevice::OpenMode mode );
     bool seek ( qint64 pos );
     qint64 pos() const;
     qint64 size () const ;
     void close(); 
protected:
     qint64 readData ( char * data, qint64 maxSize );       
     qint64 writeData ( const char * data, qint64 maxSize ); 

private:
      QUrl url; 
      QFile *file;
      QDataStream *stream;    
      qint64 position;
};
#endif
